#终端网关代理
upstream dev-device-gateway {
    server 10.6.81.60:31300;
    server 10.6.81.61:31300;
    server 10.6.81.62:31300;
}
server {
   listen 80;
   listen 443 ssl;
   server_name dev-fcgl.cgt.com.cn 10.6.89.59;
   ssl_certificate /data/nginx/certs/ssl-1/cgt.com.cn.crt;
   ssl_certificate_key /data/nginx/certs/ssl-1/cgt.com.cn.key;
   access_log off;
   ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
   ssl_ciphers HIGH:!aNULL:!MD5:!3DES;


   # 用户登录系统
   location / {
      index index.html;
      alias /data/nginx/www/view/user/;
   }

   location /unified-user-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/user/wl-dev-webapp/uap-user/outer/uap/user/;
   }
   # 通用代理
   location /currencymanageweb-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/common/wl-dev-webapp/uap-common/outer/uap/common/;
   }
   # 用户登录系统
   location /unified-user/ {
      index index.html;
      alias /data/nginx/www/view/user/;
   }
   # 电脑票代理
   location /computickets-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/computickets/wl-dev-webapp/uap-computickets/outer/uap/computickets/;
   }
   # 纸票代理
   location /paperticket-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/paperticket/wl-dev-webapp/uap-paperticket/outer/uap/paperticket/;
   }
   # 即开票中心路径代理
    location /paperticket-center-api/{
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/paperticket/wl-dev-webapp/uap-center-warehouse/outer/uap/center-warehouse/;
   }
   # 渠道管理代理
   location /channel-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/channel/wl-dev-webapp/uap-channel/outer/uap/channel/;
   }

   # 兑奖管理代理
   location /awarding-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/redemption/wl-dev-webapp/uap-redemption/outer/uap/redemption/;
   }
   # 报表代理
   location /report-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/report/wl-dev-webapp/uap-report/outer/uap/report/;
   }
   # 营销代理
   location /promotion-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/promotion/wl-dev-webapp/uap-promotion/outer/uap/promotion/;
   }
   # 终端管理系统代理
   location /terminal-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-device-gateway-server/terminal/wl-dev-device/management-server/management/;
   }
    # 运维工具系统代理
   location /manager-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/operation/wl-dev-webapp/uap-operation/outer/uap/operation/;
   }
   # 上传文件代理
   location /bucketupload-api/ {
      proxy_pass http://bs.dev.cwl.com:9003/;
   }
   # 上传文件代理
   location /wl-dev-device-gateway-server/ {
      proxy_pass http://api.dev.cwl.com;
   }
   # 用户管理系统
   location /view/unified/ {
      index index.html;
      alias /data/nginx/www/view/unified/;
   }
   # 通用系统
   location /view/currencymanager/ {
      index index.html;
      root /data/nginx/www;
      try_files $uri $uri/ /view/currencymanager/index.html;
   }
   # 纸质票系统
   location /view/paperticket/ {
      index index.html;
      alias /data/nginx/www/view/paperticket/;
   }
   # 渠道管理系统
   location /view/channelManager/ {
      index index.html;
      alias /data/nginx/www/view/channelManager/;
   }
   # 电脑票管理系统
   location /view/computickets/ {
      index index.html;
      alias /data/nginx/www/view/computickets/;
   }
   # 菜单权限管理
   location /view/permission-manager/ {
      index index.html;
      alias /data/nginx/www/view/permission-manager/;
   }
   # 报表系统
   location /view/report/ {
      index index.html;
      alias /data/nginx/www/view/report/;
   }
   # 终端管理系统
   location /view/terminal/ {
      index index.html;
      alias /data/nginx/www/view/terminal/;
   }
   # 营销系统
   location /view/promotion/ {
      index index.html;
      alias /data/nginx/www/view/promotion/;
      try_files $uri $uri/ /view/promotion//index.html;
   }
   #兑奖系统
   location /view/awarding-manager/ {
      index index.html;
      alias /data/nginx/www/view/awarding-manager/;
      try_files $uri $uri/ /view/awarding-manager/index.html;
   }
   #支付管理系统代理
   location /paymanager-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/pay/wl-dev-webapp/uap-pay/outer/uap/pay/;
   }
   #支付管理系统
   location /view/payManager/ {
      index index.html;
      alias /data/nginx/www/view/payManager/;
      try_files $uri $uri/ /view/payManager/index.html;
   }
   # 统一接入代理
   location /access-api/ {
      proxy_pass http://api.dev.cwl.com/wl-dev-webapp-uap-gateway/access/wl-dev-webapp/uap-access/outer/uap/access/;
   }
   # 统一接入
   location /view/accessmanager/ {
      index index.html;
      alias /data/nginx/www/view/accessmanager/;
      try_files $uri $uri/ /view/accessmanager/index.html;
   }

   #终端统一接入网关代理
   location /terminal-server/ {
      proxy_set_header Host $host:$server_port;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      #proxy_pass http://api.dev.cwl.com/wl-dev-device-gateway-server/terminal/wl-dev-device;
      proxy_pass http://dev-device-gateway/terminal/wl-dev-device/terminal-server/;
   }
   location /client-game-detail/ {
      proxy_set_header Host $host:$server_port;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      index index.html;
      alias /data/nginx/www/view/device-gateway-server/;
      try_files $uri $uri/ /view/device-gateway-server/index.html;
   }

   #web终端预研接入网关代理
   location /webterminal-api/ {
      proxy_pass https://terminal-app-dev.cgt.com.cn/;
   }
   # web终端预研
   location /pages/ {
      index index.html;
      alias /data/nginx/www/webterminal/;
      try_files $uri $uri/ /pages/;
   }
}
